/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2024-02-03
 * Time: 13:03
 *
 * https://www.nowcoder.com/share/jump/7745334641706936657803
 */
public class BM62 {
    public int Fibonacci(int n) {
        if (n < 3) {
            return 1;
        }
        int a = 1, b = 1;
        for (int i = 2; i < n; i++) {
            int tmp = b;
            b = a + b;
            a = tmp;
        }
        return b;
    }
}
